package com.shi.springboot.comment.service.impl;

import com.shi.springboot.comment.entity.SysUser;
import com.shi.springboot.comment.entity.SysUserToken;
import com.shi.springboot.comment.mapper.SysUserMapper;
import com.shi.springboot.comment.mapper.SysUserTokenMapper;
import com.shi.springboot.comment.service.ShiroService;
import org.apache.commons.lang3.StringUtils;

import java.util.*;

public class ShiroServiceImpl implements ShiroService {
    private SysUserMapper sysUserMapper;
    private SysUserTokenMapper sysUserTokenMapper;

    @Override
    public Set<String> getUserPermissions(Integer uid) {
        List<String> permsList = null;
        if(uid==1){

        }
        Set<String> permsSet = new HashSet<>();
        for(String perms : permsList){
            if(StringUtils.isBlank(perms)){
                continue;
            }
            permsSet.addAll(Arrays.asList(perms.trim().split(",")));
        }

        return null;
    }

    @Override
    public SysUserToken queryByToken(String token) {
        return null;
    }

    @Override
    public SysUser queryByUser(Integer uid) {
        return null;
    }
}
